package cn.wolfcode.review.service.impl;

import cn.wolfcode.review.domain.Department;
import cn.wolfcode.review.domain.Project;
import cn.wolfcode.review.mapper.DepartmentMapper;
import cn.wolfcode.review.mapper.ProjectMapper;
import cn.wolfcode.review.service.IDepartmentService;
import cn.wolfcode.review.service.IProjectService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class ProjectServiceImpl implements IProjectService {

    @Autowired
    private ProjectMapper projectMapper;

    @Override
    public void save(Project project) {
        projectMapper.insert(project);
    }

    @Override
    public void insertDevRelation(Long projectId, Long employeeId) {
        projectMapper.insertDevRelation(projectId, employeeId);
    }

    @Override
    public void insertTestRelation(Long projectId, Long employeeId) {
        projectMapper.insertTestRelation(projectId, employeeId);
    }

    @Override
    public Project selectByName(String name) {
        return projectMapper.selectByName(name);
    }

    @Override
    public void deleteTestRelation(Long projectId, Long employeeId) {
        projectMapper.deleteTestRelation(projectId, employeeId);
    }
}
